<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>上中下布局，中间自适应</title>

    <style>
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
        }
        .box{
            text-align: center;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .header {
            background-color: aquamarine;
            height: 60px;
        }
        .content {
            background-color: bisque;
            flex: 1;
        }
        .footer {
            background-color: chocolate;
            height: 60px;
        }
    </style>
  </head>
  <body>

    <div class="box">
        <div class="header">header</div>
        <div class="content">content</div>
        <div class="footer">footer</div>
    </div>

    <script></script>
  </body>
</html>
